How to refer to a form, report, subform, or subreport in an expression.





In the query Design View, use the syntax 'Form or Report ! [Form name or Report Name]' in the desired expression.

    1) If the Database window is not active, activate the Database window.
    2) Choose the 'Queries' tab in the Database window.
    < Queries tab >
    3) Select the desired query in the list box. (The selected query is highlighted.)
    4) Choose the 'Design' button. (The query appears in Design View.)
    5) Position the mouse pointer in the desired cell that contains the expression.
    6) To refer to a form or report, do the following:

      a) To refer to a form, enter the desired identifier using the syntax
      Forms![form name]
      EXAMPLE: Forms![Orders]
      (where [Orders] is the name of the form).
      b) To refer to a report, enter the desired identifier using the syntax
      Reports![Report Name]
      EXAMPLE: Reports![Invoice]
      (where [Invoice] is the name of the report).

    7) To refer to a subform or subreport, do the following:

      a) To refer to a subform, enter the desired identifier using the syntax
      Forms![Form Name]![Subform Name].Form
      EXAMPLE: Forms![Orders]![Orders Details].Form
      (where [Orders] is the name of the main form and [Orders Details] is the name of the subform).
      b) To refer to a subreport, enter the desired identifier using the syntax
      Reports![Report Name]![Subreport Name].Report
      EXAMPLE: Reports![Invoice]![Invoice Per Order].Report

    (where [Invoice] is the name of the main report and [Invoice Per Order] is the name of the subreport).


Knowledge-Pak Desktop Suite (TM) Edition 5
Copyright (c) 1994-1997 by ServiceWare Inc. Subject to the terms set forth in the end-user license agreement. All rights reserved.



2nd Opinion copyright © 1997 by McAfee Associates.
Subject to the terms set forth in the end-user license agreement. All rights reserved.